//
//  UIImage+Color.m
//  MeetCard
//
//  Created by longmin on 16/11/9.
//  Copyright © 2016年 timtian. All rights reserved.
//

#import "UIImage+Color.h"

@implementation UIImage (Color)

+(instancetype)lm_imageWithColor:(UIColor *)color {
    
    UIGraphicsBeginImageContextWithOptions(CGSizeMake(1.0,1.0), NO, 1.0);
    UIBezierPath* p = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 1.0, 1.0)];
    
    [color setFill];

    [p fill];
    UIImage* im = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return im;
}

@end
